﻿using UnityEngine;
using UnityEngine.UI;

public class InfoPanel : MonoBehaviour {
    public static InfoPanel Ins { get; private set; }
    [SerializeField]
    private Text text;

    private void Awake() {
        Ins = this;
    }

    private void Update() {
        text.text = StatusText;
    }

    public string StatusText {
        get {
            return string.Format(
                "当前坐标 X：{0} Y：{1} Z：{2}\n" +
                "当前位置 {3}\n位置信息 {4}",
                (int)Player.Ins.Position.x,
                (int)Player.Ins.Position.y,
                (int)Player.Ins.Position.z,
                Player.Ins.currentPoint.pointName,
                Player.Ins.currentPoint.description);
        }
    }
}